<%--
  Created by IntelliJ IDEA.
  User: CY
  Date: 2018/8/15
  Time: 15:12
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>数据报表</title>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" type="text/css" href="../../css/workflow/m_reset.css">
    <link rel="stylesheet" type="text/css" href="../../css/workflow/work/workMonitor.css">
    <link rel="stylesheet" href="../../css/officialDocument/officialDocument.css">
    <link rel="stylesheet" type="text/css" href="../../lib/pagination/style/pagination.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/base.css" />
    <link rel="stylesheet" type="text/css" href="/css/base/base.css?20201106.1" />
    <link rel="stylesheet" href="/lib/layer/skin/default/layer.css">
    <link rel="stylesheet" type="text/css" href="../../css/workflow/work/handle.css"/>
    <script type="text/javascript" src="/js/jquery/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="/js/base/tablePage.js"></script>
    <script src="/lib/layer/layer.js?20201106"></script>
    <script src="/js/base/base.js"></script>
    <script src="../../lib/pagination/js/jquery.pagination.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery/jquery.cookie.js"></script>
    <style>
        .box{
            width:100%;
            height:100%;
        }
        .header{
            position: fixed;
            width: 100%;
            background: #fff;
            width: 100%;
            height: 45px;
            border-bottom: 1px solid #9E9E9E;
        }
        .title{
            margin-left: 20px;
        }
        .workMon{
            font-size: 22px;
            font-weight: normal;
            line-height: 45px;
            float: none;
            margin-top: 9px;
            font-size: 22px;
            color: #333;
        }
        .content{
            padding-top: 53px;
        }
        .outer{
            width:100%;
        }

        .outer .list{
            float:left;
            width:20%;
            margin-left:2%;
            border: 0px #779DDB solid;
            border-left-width: 5px;
            border-right: 1px solid #ccc;
            border-bottom: 1px solid #ccc;
            border-top: 1px solid #EBEBEB;
            background: #fff !important;
            padding: 0px 10px;
            color: #779DDB;
            margin-bottom: 15px;
            margin-left: 7px;
            margin-right: 7px;
            position: relative;
            padding-bottom: 2px;
            border-radius: 2px;
        }
        .iTit{
            font-size:16px;
            line-height: 30px;
            cursor:pointer;
        }
        .inner{
            border-top: 1px solid #779DDB;
        }
        .lis a{
            color: #333;
            line-height: 30px;
            cursor:pointer
        }

    </style>
</head>
<body>
    <div class="box">
        <div class="header">
            <div class="title">
                <img src="/img/commonTheme/theme6/gongzuojiankong.png" alt="" style="margin-bottom:10px;">
                <h3 style="display:inline;" class="workMon">数据报表</h3>
            </div>
        </div>
        <div class="noData" style="display:none">
            <div style="text-align: center;padding-top: 80px;"><img src="/img/main_img/shouyekong.png" alt=""></div>
            <div style="text-align: center;font-size: 13pt;margin-top: 10px;">暂无数据</div>
        </div>
        <div class="content">
            <ul class="outer">
                <li class="list">
                    <div class="iTit">公文管理</div>
                    <ul class=" inner">
                        <li class="lis"><a href="javascript:;">111</a></li>
                    </ul>
                </li>
                <li></li>
            </ul>
        </div>
    </div>
    <script>
        <%--获取列表数据--%>
        $(function(){
            $.ajax({
                url:'/workflow/work/getReportList',
                dataType:'json',
                type:'get',
                success:function(res){
                    $('.outer').html('')
                    var data = res.obj;
                    var str = ''
                    if(res.flag && data.length>0){
                        $('.noData').hide()
                        for(var i=0;i<data.length;i++){
                            str += '<li class="list">' +
                                '                    <div class="iTit">'+data[i].sortName+'</div>' +
                                '                    <ul class="inner">'+function () {
                                    var strs = ""
                                    for(var j=0;j<data[i].flowReportList.length;j++){
                                        strs += '<li class="lis"><a href="javascript:;" onclick="showReport('+data[i].flowReportList[j].rId+','+data[i].flowReportList[j].flowId+')">'+data[i].flowReportList[j].rName+'</a></li>'
                                    }
                                    return strs;
                                }()+'</ul>' +
                                '                </li>';
                        }
                        $('.outer').html(str)
                    }else{
                        $('.noData').show()
                    }

                }
            })
        })
        function showReport(id,flowId){
            window.open('/workflow/work/flowReportByIdMain?rId='+id+'&flowId='+flowId)
        }
//        显示隐藏
        $(document).on('click','.iTit',function(){
            if($(this).next().css('display')!='none'){
                $(this).next().hide()
            }else{
                $(this).next().show()
            }
        })
    </script>
</body>
</html>
